//------------------------------------------------------------------------------

#include <stdio.h>
#include <stdlib.h>

#include "diff.h"

//------------------------------------------------------------------------------
int main(void) {
	int i;

	for (i = 0; i < 2; i++) {
		char *text1 = "Brad\nPitt\r\nest\nle\nplus\nbeau";
		char *text2 =
				"Non\n,\nc'est\nCorentin\nLe Bail\nqui\nest\nle\nplus\nfort\n, \nle\nplus\nbeau\net\nle\nplus\nintelligent";
		char *patch;
		char *merged;

		/*printf(text1);
		 printf("\n--------------------------\n");

		 printf(text2);
		 printf("\n--------------------------\n");*/

		diff(text1, text2, &patch);
		printf(patch);
		printf("\n");

		printf("\n--------------------------\n");

		merge(text1, patch, &merged);
		printf(merged);

		printf("\n--------------------------\n");

		// getchar();

		free(patch);
		free(merged);
	}
	return 0;
}
//------------------------------------------------------------------------------
